package com.caiheng.api.entity.wxuser;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.omg.CORBA.INTERNAL;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

/**
 * 用户的商家抵扣券对象 user_mer_coupon
 *
 * @author ruoyi
 * @date 2022-02-24
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("user_mer_coupon")
public class UserMerCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * $column.columnComment
     */
    private Integer userId;

    /**
     * $column.columnComment
     */
    private Integer couponId;

    private Integer couponType;

    /**
     * $column.columnComment
     */
    private BigDecimal price;

    /**
     * $column.columnComment
     */
    private BigDecimal dikouPrice;

    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginTime;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    /**
     * 状态  0 - 未使用 1 - 已使用 2 - 已过期
     */
    private Integer state;

    /**
     * 商家id
     */
    private Integer merId;

    /**
     * 商家名称
     */
    private String merName;

    /**
     *  优惠券名称
     */
    private String couponName;

}
